﻿using System;

namespace NotAClue.ComponentModel.DataAnnotations
{
    /// <summary>
    /// An attribute used to specify the filtering behavior for a column.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
    public sealed class PopupInsertAttribute : Attribute
    {
        /// <summary>
        /// Gets or sets the width of the window.
        /// </summary>
        /// <value>The width of the window.</value>
        public int WindowWidth { get; set; }

        /// <summary>
        /// Gets or sets the height of the window.
        /// </summary>
        /// <value>The height of the window.</value>
        public int WindowHeight { get; set; }

        /// <summary>
        /// Gets or sets the popup page.
        /// </summary>
        /// <value>The popup page.</value>
        public String PopupPage { get; set; }

        /// <summary>
        /// Gets or sets the button text.
        /// </summary>
        /// <value>The button text.</value>
        public String ButtonText { get; set; }

        /// <summary>
        /// Gets or sets the additional query string.
        /// </summary>
        /// <value>The additional query string.</value>
        public String AdditionalQueryString { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [scroll bars].
        /// </summary>
        /// <value><c>true</c> if [scroll bars]; otherwise, <c>false</c>.</value>
        public Boolean ScrollBars { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="PopupInsertAttribute"/> class.
        /// </summary>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        public PopupInsertAttribute(int width, int height)
        {
            WindowWidth = width;
            WindowHeight = height;
        }
    }
}
